<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>销售订单</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="stylesheet" type="text/css" href="/zhenze/Public/home/css/reset.css"/>
		<link rel="stylesheet" href="/zhenze/Public/home/css/xiaoshoudingdan.css" />
		<link rel="stylesheet" href="/zhenze/Public/home/css/font-awesome.min.css" />
		<style>
		.btn00{line-height: 1.4rem;width: 16.75rem;margin: 1rem auto;border: none;background:#FF3C00;color: #FFFFFF;font-size:0.75rem;display: block;}
		</style>
	</head>
	<body>
		<div class="top">
			<a href="javascript:history.go(-1);"><i class="fa fa-angle-left"></i></a>
			<p>销售订单</p>
		</div>
		<div class="cont">
			<img src="<?php echo ($user['avatar']); ?>" />
			<p><?php echo ($user['nickname']); ?></p>
			<div class="clear"></div>
		</div>
		<div class="money">
			<p>佣金金额<br /><?php echo ($user['money']); ?>元</p>
		</div>
		<ul class="ull" >
			<li><p id="pp">销售订单</p></li>
			<?php if(is_array($listinfo)): $i = 0; $__LIST__ = $listinfo;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$data): $mod = ($i % 2 );++$i;?><li>
				<img src="<?php echo ($data["avatar"]); ?>" />
				<p><?php echo ($data["nickname"]); ?></p>
				<?php if($data["status"] > 3): ?><p>已办理</p>
				<?php else: ?> 
					<p class="color">未办理</p><?php endif; ?>
			
			</li><?php endforeach; endif; else: echo "" ;endif; ?>
		</ul>
		<div class="list"></div>
		<button onclick="getmore()" id="morebtn" data='1' class="btn00">更多</button>
		
		<script type="text/javascript" src="/zhenze/Public/home/js/jquery-3.1.1.min.js" ></script>
		<script src="/zhenze/Public/home/js/screenSize.js" type="text/javascript" charset="utf-8"></script>
	</body>
	<script>
		function getmore(){
			var page=parseInt($('#morebtn').attr("data"))+1;
		
			$.getJSON("<?php echo U('index/myorder');?>&p="+page,function(result){
				console.log(result.listinfo);
				$('#morebtn').attr("data",page);//重置当前页数
				var data=result.listinfo;
				if(data.length>0){
					var html="";
					for(var i=0;i<data.length;i++){
						html+='		<li>';
						html+='			<img src="'+data[i].avatar+'" />';
						html+='			<p>'+data[i].nickname+'</p>';		
						if(data[i].status>3){
							html+='			<p>已办理</p>';
						}else{
							html+='			<p class="color">未办理</p>';
						}
						html+='		</li>';
					}
					$(".ull").append(html);
				}else{
					$("#morebtn").html('亲，没有数据了！');
				}
			});
		}
	</script>
</html>